package com.websuites.webservice;

import java.util.ArrayList;
import java.util.List;

public class UserPrivilege extends WsSimpleService 
{
	private String sUserName;
	private String sPassWord;
	private List<String> listBex = new ArrayList<String>();
	
	public String getUserName()
	{
		return sUserName;
	}
	public void setUserName(String sUserName)
	{
		this.sUserName = sUserName;
	}

	public String getPassword()
	{
		return sPassWord;
	}
	public void setPassword(String sPassWord)
	{
		this.sPassWord = sPassWord;
	}
	
	public void pubBex(String sBex)
	{
		listBex.add(sBex);
	}
	
	public boolean havePrivilege(String sBex, String sPassword)
	{
		if (sPassWord.equals(sPassword))
		{
			return listBex.contains(sBex);			
		}
		else
		{
			return false;
		}
	}
}
